package com.itany.shop.service;

import com.itany.shop.entity.User;
import com.itany.shop.exception.*;

/**
 * Author:shixiaojun@itany.com
 * Date:2022/4/14 13:34
 * Version:1.0-SNAPSHOT
 * Description:
 */
public interface UserService {

    /**
     * 用户注册
     * @param username
     * @param password
     * @param phone
     * @param address
     */
    public void register(String username,String password,String phone,String address) throws RequestParameterErrorException, UserExistException, ServiceException;

    /**
     * 用户登录
     * @param username  用户名
     * @param password  密码
     * @param code      用户输入的验证码
     * @param image     验证码图片中的内容
     * @return
     */
    public User login(String username,String password,String code,String image) throws RequestParameterErrorException, CodeErrorException, UserNotExistException, ServiceException;
}
